﻿/*
 * Uses TextEditorControl from SharpDevelop project,
 * http://sharpdevelop.net/OpenSource/SD/
 */



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;


namespace WpfModelicaPad {
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window {
        public Window1() {
            InitializeComponent();
            TextEditorControl txtEdit = new TextEditorControl();


            //string dir = "D:\\Projects\\SwProjekt\\Dev\\WpfModelicaPad\\WpfModelicaPad";
            //string dir = "resources";
            //FileSyntaxModeProvider fsmProvider;
            //if ( Directory.Exists(dir) )            
            //{
            //fsmProvider = new FileSyntaxModeProvider(dir); // Create new provider with the highlighting directory.            
            //HighlightingManager.Manager.AddSyntaxModeFileProvider(fsmProvider); // Attach to the text editor.            
            txtEdit.SetHighlighting("Modelica"); // Activate the highlighting, use the name from the SyntaxDefinition node.
            
            //}

            this.windowsFormsHost1.Child = txtEdit;
        }
    }
}
